<%@ include file="/en/jsp/static.jsp" %>
<%@ page import="java.util.*, linuxbox.filelib.logic.*" %>
<%@ taglib uri="/linuxbox/common.tld" prefix="common" %>

<jsp:include page="/en/jsp/header.jsp" flush="true"/>

<%
  FileLibHome home = FileLibHome.getInstance();
  FileLibEntry entry = (FileLibEntry)session.getAttribute("filelib.CURENTRY");
  if (entry == null)
  {
    pageContext.forward(BoxStatic.errorJSP);
    return;
  }

  if (!home.checkAccessRights(curID, entry, home.WRITE_ALLOW))
  {
    pageContext.forward(BoxStatic.accessRightErrorJSP);
    return;
  }
  String location = home.getPathString(entry.getParent());
%>

<table width="100%" height=26 align=middle border=0 cellpadding=0 cellspacing=0 bgcolor="#f4f4f4" style="font-size:16px;color:#d05000">
  <tr>
    <td>
	    &nbsp;<img src="<%=BoxStatic.imageDir%>itemball.jpg" width=14 height=15 border=0 align="absmiddle">
	    <b><%=boxName%> - File Library&nbsp; - Delete Folder/File</b>
    </td>
    <td align=right>
      <a href="<%=BoxStatic.servletDir%>BoxFileLibSettingsAction?SubmitEdit=edit">
        Settings
      </a>
    </td>
  </tr>
</table>
<hr width=\"100%\" color=#E06000 align=left>

  <table width= "100%" border=1 cellspacing=0 cellpadding=1>
    <tr><td>
      <table border=0 width="100%" bgcolor=#e0e0e0 style="font-size:14px">
        <form action="<%=BoxStatic.servletDir%>EditFolderAction" method=post>
          <input type=hidden name=ID value=<%=entry.getID()%>>
          <tr><td>
            You are going to delete the following Folder(s)/File(s)?
            <input type=button value=Cancel onclick="window.history.go(-1)" >

<%
  if (home.checkAccessRights(curID, entry, home.WRITE_ALLOW))
  {
%>
            <input type=submit value="Delete" name=SubmitDelete>
<%
  }
%>
          </td></tr>
          <tr><td>
            <b>Folder Name:</b><%=((entry.getName()==null)?"":entry.getName())%>
          </td></tr>
          <tr><td>
            <b>Folder Location:</b> <%=location%>
          </td></tr>
          <tr><td>
            <b>TODO: Access Rights, Owner, Group</b>
          </td></tr>
          <tr><td >
            <b>Description:</b><br>
            <textarea name=DESCRIPTION rows=5 cols=60><%=((entry.getDescription()==null)?"":entry.getDescription())%></textarea><br>
          </td></tr>
        </form>
      </table>
    </td></tr>
  </table>

  <hr width=\"100%\" color=#E06000 align=left>

<jsp:include page="/en/jsp/footer.jsp" flush="true"/>
